home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
language
/
euphor12
/
shroud.ex
< prev
next >
Wrap
Text File
|
1994-03-10
|
8KB
|
610 lines
----------------------------
-- Source Code Shrouder --
----------------------------
-- usage: ex shroud filename.ex > newname.ex
-- 1. Pulls together all include files into a single file.
-- 2. Eliminates all comments and superfluous white space.
-- 3. Replaces all identifiers by short meaningless names.
-- 4. Replaces all keywords and builtin names by single-byte codes.
-- 5. Replaces all strings by numeric ASCII codes
-- Your program should be free of any syntax errors before running
-- the shrouder on it.
-- The result is an unreadable, unmaintainable file that runs identically
-- to your original source files (which you will keep for yourself). You can
-- distribute:
-- 1. your shrouded file
-- 2. dos4gw.exe
-- 3. the PD Edition of ex.exe
-- without "giving away" your source. Shrouded source has certain advantages
-- over .exe files:
-- - you can add readable comments
-- - you can document certain changes that can be made to reconfigure
-- your program
-- - your code could serve as a library of routines that others could
-- build on (you should add some readable routine names as an interface)
-- - the same shrouded file could be distributed to run on more than
-- one machine architecture (as long as Euphoria exists for that
-- machine).
-- - shrouded source is extremely compact. With one copy of dos4gw.exe
-- and ex.exe on the search path, you can support many shrouded
-- programs.
-- We ran the shrouder on itself to get ...
ùtype_check
îB=1,C=0
îD=B
îE=B
îF=-1
îG=1,H=2
îI=128,
J=170
ÆîK={
{
105,102},{
101,110,100},{
116,104,101,110},{
112,114,111,99,101,100,117,114,101},{
101,108,115,101},{
102,111,114},{
114,101,116,117,114,110},
{
100,111},{
101,108,115,105,102},{
119,104,105,108,101},{
116,121,112,101},{
99,111,110,115,116,97,110,116},{
116,111},{
97,110,100},{
111,114},
{
101,120,105,116},{
102,117,110,99,116,105,111,110},{
103,108,111,98,97,108},{
98,121},{
110,111,116},{
105,110,99,108,117,100,101},
{
119,105,116,104},{
119,105,116,104,111,117,116},{
112,114,111,102,105,108,101}}
ÆîL={
{
108,101,110,103,116,104},{
112,117,116,115},{
105,110,116,101,103,101,114},{
115,101,113,117,101,110,99,101},{
112,111,115,105,116,105,111,110},{
111,98,106,101,99,116},
{
97,112,112,101,110,100},{
112,114,101,112,101,110,100},{
112,114,105,110,116},{
112,114,105,110,116,102},
{
99,108,101,97,114,95,115,99,114,101,101,110},{
102,108,111,111,114},{
103,101,116,99},{
103,101,116,115},{
103,101,116,95,107,101,121},
{
114,97,110,100},{
114,101,112,101,97,116},{
97,116,111,109},{
99,111,109,112,97,114,101},{
102,105,110,100},{
109,97,116,99,104},
{
116,105,109,101},{
99,111,109,109,97,110,100,95,108,105,110,101},{
111,112,101,110},{
99,108,111,115,101},{
116,114,97,99,101},{
103,101,116,101,110,118},
{
115,113,114,116},{
115,105,110},{
99,111,115},{
116,97,110},{
108,111,103},{
115,121,115,116,101,109},{
100,97,116,101},{
114,101,109,97,105,110,100,101,114},
{
112,111,119,101,114},{
109,97,99,104,105,110,101,95,102,117,110,99},{
109,97,99,104,105,110,101,95,112,114,111,99},{
97,98,111,114,116},{
112,101,101,107},{
112,111,107,101},
{
99,97,108,108}}
îM=1,
N=2,
O=3,
P=4,
Q=5,
R=6,
S=7,
T=8
îU={
43,45,42,47,91,93,40,41,123,125,44,46,61,38,39,34,60,62}
îV=-999
îW=1,X=2,Y=3
ïZ(¡a)
ç╛(a,{Y,X,W})
éï
ïa(¡b)
çb>=-1
éï
ïb(¡c)
çc>=FÄc<=255Åc=V
éï
ïc(¡d)
çd>=0
éï
ïd(¡e)
çe=BÅe=C
éï
«e
äf()
e=╗(N,255)
e[97..122]=O
e[65..90]=O
e[95]=O
e[48..57]=M
e[35]=T
e[91]=P
e[93]=P
e[40]=P
e[41]=P
e[123]=P
e[125]=P
e[39]=Q
e[34]=Q
e[32]=S
e[9]=S
e[10]=S
e[45]=R
éä
b g
g=V
æh(a i)
b j
üg=Vâ
ç╖(i)
à
j=g
g=V
çj
éü
éæ
äi(b j)
g=j
éä
a j,k
b l
l=V
äm(b n)
ü╛(n,{
32,9,10})â
ül=10â
ç
éü
ün !=10â
ül>IÅ╛(l,U)â
ç
ë╛(l,{
32,9})â
ç
éü
éü
ën>IÅ╛(n,U)â
ü╛(l,{
32,9})â
l=V
éü
éü
ül !=Vâ
¼(j,l)
éü
l=n
éä
än(«o)
ül !=Vâ
¼(j,l)
l=V
éü
¼(j,o)
éä
«o
o={}
äp(«q)
o=o&q
éä
c q
q=1
ær()
c s,t
«u
ü½(o)>0â
u=o[1]
o=o[2..½(o)]
çu
éü
u={}
t=q
èBê
s=═(t,52)
t=╢(t/52)
üs<26â
u=65+s&u
à
u=97+s-26&u
éü
üt=0â
É
éü
éè
q=q+1
ü╛(u,K)â
çr()
ë╛(u,L)â
çr()
à
çu
éü
éæ
Z s
s=X
d t
t=C
¡u,v
u=1
v=1
«w,x,y
w={{},{}}
x={{{},{}}}
y={{},{}}
æz(«BA)
«BB
c BC
BC=0
BC=╛(BA,y[G])
üBCâ
çy[H][BC]
éü
BC=╛(BA,w[G])
üBCâ
çw[H][BC]
éü
BC=╛(BA,x[u][G])
üBCâ
çx[u][H][BC]
éü
BB=r()
üs=Wâ
y[G]=▒(y[G],BA)
y[H]=▒(y[H],BB)
à
üötâ
s=X
éü
üs=Yâ
w[G]=▒(w[G],BA)
w[H]=▒(w[H],BB)
à
x[u][G]=▒(
x[u][G],BA)
x[u][H]=▒(
x[u][H],BB)
éü
éü
çBB
éæ
«BA
BA={}
«BB
æBC()
b BD
«BE
a BF
BA=▒(BA,{k,u})
v=v+1
u=v
x=▒(x,{{},{}})
BD=V
BE={}
èBD !=10ÄBD !=Fê
BD=h(k)
üe[BD]!=Sâ
BE=BE&BD
éü
éè
BF=┬(BB&BE,{
114})
üBF=-1â
BF=┬(┼({
69,85,68,73,82})&{
92,73,78,67,76,85,68,69,92}&BE,{
114})
üBF=-1â
¼(2,{
67,111,117,108,100,110,39,116,32,111,112,101,110,32,105,110,99,108,117,100,
101,32,102,105,108,101,58,32}&BE&10)
ç-1
éü
éü
çBF
éæ
æBD()
a BE
├(k)
ü½(BA)=0â
ç-1
éü
BE=BA[½(BA)][1]
u=BA[½(BA)][2]
BA=BA[1..½(BA)-1]
çBE
éæ
æBF(╝BE)
«BG
BG={}
è1ê
BG=48+═(BE,10)&BG
BE=╢(BE/10)
üBE=0â
çBG
éü
éè
éæ
äBE(b BG)
üBG=110â
n(BF(10))
ëBG=116â
n(BF(9))
ëBG=114â
n(BF(13))
à
n(BF(BG))
éü
éä
îBG=1,BH=0
æBI(d BJ)
c BK,BL,BM
b BN,BO
«BP,BQ
èBê
BO=h(k)
üBO=Fâ
çF
éü
BK=e[BO]
üBK=Sâ
m(BO)
ëBK=Oâ
BP={BO}
èBê
BO=h(k)
BK=e[BO]
üBK=Oâ
BP=BP&BO
ëBK=Mâ
BP=BP&BO
à
i(BO)
É
éü
éè
BL=╛(BP,K)
üBLâ
ü╜(BP,{
105,110,99,108,117,100,101})!=0â
üDÄBJâ
m(I+BL)
à
n(BP)
éü
éü
à
BL=╛(BP,L)
üBLâ
üDÄBJâ
m(J+BL)
à
n(BP)
éü
à
üBJâ
n(z(BP))
à
n(BP)
éü
éü
éü
çBP
ëBK=NÅBK=Pâ
m(BO)
çBO
ëBK=Mâ
èe[BO]=MÅ╛(BO,{
101,69})ê
m(BO)
BO=h(k)
éè
i(BO)
ëBK=Tâ
m(BO)
BO=h(k)
èe[BO]=MÅ╛(BO,{
65,66,67,68,69,70})ê
m(BO)
BO=h(k)
éè
i(BO)
ëBK=Râ
BO=h(k)
ü(BO=45)â
BQ=╕(k)
m(10)
à
m(45)
i(BO)
éü
à
BQ={}
èBê
BN=h(k)
üBN=10ÅBN=Fâ
¼(2,{
109,105,115,115,105,110,103,32,99,108,111,115,105,110,103,32,113,117,111,116,
101,10})
É
éü
üBN=BOâ
É
éü
BQ=BQ&BN
üBN=92â
BN=h(k)
BQ=BQ&BN
éü
éè
üEâ
üBO=39â
m(32)
üBQ[1]=92â
BE(BQ[2])
à
n(BF(BQ[1]))
éü
à
m(123)
BM=1
èBM<=½(BQ)ê
ü═(BM,20)=1â
m(10)
éü
BO=BQ[BM]
üBO=92â
BM=BM+1
BO=BQ[BM]
BE(BO)
à
n(BF(BO))
éü
üBM<½(BQ)â
m(44)
éü
BM=BM+1
éè
m(125)
éü
à
m(BO)
n(BQ)
m(BN)
éü
éü
éè
éæ
äBJ()
░BK
BK=V
èBê
BK=BI(BG)
ü╜(BK,F)=0â
k=BD()
ük=-1â
m(V)
ç
éü
ë╜(BK,{
101,110,100})=0â
BK=BI(BG)
ü╛(BK,{{
112,114,111,99,101,100,117,114,101},{
102,117,110,99,116,105,111,110},{
116,121,112,101}})â
s=X
p(y[H])
y={{},{}}
éü
ë╜(BK,{
103,108,111,98,97,108})=0â
s=Y
t=B
è╜(BK,{
103,108,111,98,97,108})=0ê
BK=BI(BG)
BK=BI(BG)
BK=BI(BG)
ü╜(BK,40)=0â
s=W
éü
éè
ë╛(BK,{{
112,114,111,99,101,100,117,114,101},{
102,117,110,99,116,105,111,110},{
116,121,112,101}})â
BK=BI(BG)
s=W
ë╜(BK,{
105,110,99,108,117,100,101})=0â
k=BC()
ük=-1â
ç
éü
ë╛(BK,{{
119,105,116,104},{
119,105,116,104,111,117,116}})â
BK=BI(BH)
ë╜(BK,44)=0â
t=B
à
t=C
éü
éè
éä
äBL()
«BM
c BN
BM=┴()
ü½(BM)!=3â
¼(2,{
117,115,97,103,101,58,32,101,120,32,115,104,114,111,117,100,32,102,105,108,
101,110,97,109,101,46,101,120,32,62,32,110,101,119,110,97,109,101,46,101,
120,10})
ç
éü
k=┬(BM[3],{
114})
ük=-1â
k=┬(BM[3]&{
46,101,120},{
114})
ük=-1â
┤(2,{
99,111,117,108,100,110,39,116,32,111,112,101,110,32,37,115,10},{BM[3]})
ç
éü
éü
BN=½(BM[3])
èBM[3][BN]!=92ê
BN=BN-1
üBN=0â
É
éü
éè
BB=BM[3][1..BN]
f()
j=1
BJ()
éä
BL()